<?php

namespace Esseak\FetchPackage\Admin\Controllers;

use App\Admin\Metrics\Examples;
use Dcat\Admin\Http\Controllers\AdminController;
use Dcat\Admin\Http\Controllers\Dashboard;
use Dcat\Admin\Layout\Column;
use Dcat\Admin\Layout\Content;
use Dcat\Admin\Layout\Row;
use Dcat\Admin\Grid;
use Esseak\FetchPackage\Models\Video;

class VideosController extends AdminController{
    /**
     * Make a grid builder.
     *
     * @return Grid
     */
    protected function grid()
    {
        return Grid::make(new Video(), function (Grid $grid) {
			$grid->model()->orderBy('id');

            $grid->column('id')->sortable();
            $grid->column('source_id')->limit(10);
            $grid->column('title');
            $grid->column('userName');
            $grid->column('userPic')->image('', 60, 60);
            $grid->column('coverUrl')->image('', 60, 60);
            $grid->column('playUrl');
            $grid->column('duration');
            $grid->column('created_at');
            $grid->column('updated_at');
        });
    }
}